<header class="header">
    <div class="nav-bar">
        <div class="nav-tabs">
            <ul class="layui-nav" lay-filter="top-menu">
                {if isset($top_menu) && !empty($top_menu)}
                {foreach $top_menu as $key => $value}
                <li class="layui-nav-item {if $key == 0}layui-this{/if}">
                    <a data-pid="{$value.pid}">{$value.name}</a>
                </li>
                {/foreach}
                {/if}
            </ul>
        </div>
        <div class="nav-menus">
            <div id="logout" class="nav-menu-item">
                <i class="iconfont icon-logout"></i>
                <span class="text">退出</span>
            </div>
        </div>
    </div>
</header>